package oo.day03;

public class TJTest {

	public static void main(String[] args) {
		Tetromino t = new T(1,2);
//		Cell[] cellsT = t.cells;
		printWall(t);
		System.out.println("-----------");
		J j = new J(3,5);
//		Cell[] cellsJ = j.cells;
		printWall(j);
	} 

	public static void printWall(Tetromino t) {
		Cell[] cells = t.cells;
		for(int i = 0; i < 20; i++) {
			for(int j = 0; j < 10; j++) {
				boolean flag = false;
				for(int k = 0; k < cells.length; k++) {
					if(i == cells[k].row && j == cells[k].col) {
						flag = true;
						break;
					}
				}
				if(flag) {
					System.out.print("* ");
				}else {
					System.out.print("- ");
				}
			}
			System.out.println();
		}
		System.out.print("--------------------------------------");
	}
}
